package com.onlineexam.controller;

import com.onlineexam.bean.XuanZe;
import com.onlineexam.mapper.XuanZeMapper;
import com.onlineexam.util.JsonResult;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin("*")
@RestController
@RequestMapping("/xuanze")
public class XuanZeController {
    @Resource
    private XuanZeMapper XuanZeMapper;

    @RequestMapping("/list") //选择题列表
    public JsonResult XuanzeList() {
        List<XuanZe> list = XuanZeMapper.list();
        JsonResult result = new JsonResult(true,200,list,"");
        return result;
    }
}
